home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1986 January & February
/
rerun-1986-01-02.d64
/
word jumbler 64
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
115 lines
10 dimd$(23),ts(5),w$(20),l1(12),l2(12)
20 d$(0)="":forx=1to23:d$(x)=d$(x-1)+"":next:c=54272:forx=1to160:readw$:next
30 forx=1to12:readl1(x):next:print"[147]":poke53280,0:poke53281,0:poke646,1
40 printd$(12)tab(17)"whatzit":forx=15to1step-1:poke646,x
50 printd$(10)tab(15)" ":fory=1to3:printtab(15)" "tab(25)" ":next
60 printtab(15)" ":printd$(8)tab(13)" "
70 fory=1to7:printtab(13)" "tab(27)" ":next:printtab(13)" "
80 printd$(6)tab(11)" ":fory=1to11
90 printtab(11)" "tab(29)" ":next:printtab(11)" "
100 printd$(4)tab(9)" ":fory=1to15
110 printtab(9)" "tab(31)" ":next:printtab(9)" ":next
120 forx=ctoc+23:pokex,0:next:pokec+24,15:pokec+5,10:pokec+6,10
130 readh:ifh=0then160
140 readl:pokec,l:pokec+1,h:pokec+4,17:forx=1to100:next:pokec+4,16
150 forx=1to75:next:goto130
160 print"[147]":poke53280,2:poke53281,3:poke646,6:printd$(2)tab(6)"i'm hungry"
170 printtab(6)"music makers":printtab(6)"people parts"
180 printtab(6)"pretty petals":printtab(6)"home sweet home"
190 printtab(6)"how's the weather?":printtab(6)"all work and no play"
200 printtab(6)"two legs, four legs, no legs":poke646,2
210 printtab(6)"move cursor with joystick...."
220 printtab(7)"press fire button to select":op=1108:pokeop,160:pokeop+c,1
230 forx=1to100:next:if(peek(56320)and16)=0then290
240 j=15-(peek(56320)and15):ifj=1thendi=-80:goto270
250 ifj=2thendi=80:goto270
260 goto230
270 np=op+di:ifnp<1108ornp>1668then230
280 pokenp+c,1:pokeop,32:pokenp,160:pokeop+c,3:op=np:goto230
290 restore:ca=(op-1028)/80:oncagosub300,310,320,330,340,350,360,370:goto380
300 return
310 forx=1to20:readw$:next:return
320 forx=1to40:readw$:next:return
330 forx=1to60:readw$:next:return
340 forx=1to80:readw$:next:return
350 forx=1to100:readw$:next:return
360 forx=1to120:readw$:next:return
370 forx=1to140:readw$:next:return
380 forx=1to20:readw$(x):next
390 print"[147]":poke53280,0:poke53281,0:poke646,1
400 printd$(18)tab(4)"word"tab(17)"score"tab(24)"bonus"tab(31)"total"
410 wc=0:tc=0:cu=18
420 wc=wc+1:ifwc>5then800
430 tc=tc+2:poke646,tc:printd$(2)tab(11)" ":forx=1to3
440 printtab(11)" ":printtab(11)" "tab(27)" "
450 printtab(11)" ":printtab(11)" ":next
460 printtab(11)"[145] ":poke646,13
470 forx=1to12:l2(x)=l1(x):next:lp=0:wp$=""
480 wn=int(rnd(1)*20)+1:ifw$(wn)=""then480
490 lp=lp+1:iflp>len(w$(wn))then520
500 x=int(rnd(1)*12)+1:ifl2(x)=0then500
510 pokel2(x),asc(mid$(w$(wn),lp,1))-64:pokel2(x)+c,14:l2(x)=0:goto490
520 x=int(rnd(1)*12)+1:ifl2(x)=0then520
530 op=l2(x):pokeop,42:pokeop+c,7:ti$="000000"
540 forx=1to60:next:if(peek(56320)and16)=0then620
550 j=15-(peek(56320)and15):ifj=1thendi=-40:goto600
560 ifj=2thendi=40:goto600
570 ifj=4thendi=-1:goto600
580 ifj=8thendi=1:goto600
590 goto540
600 np=op+di:ifpeek(np)<>32then540
610 pokenp+c,7:pokeop,32:pokenp,42:pokeop+c,0:op=np:goto540
620 ifpeek(op-40)>26then540
630 wp$=wp$+chr$((peek(op-40))+64):printd$(1)tab(11)wp$:pokeop-40,32
640 pokeop-40+c,0:iflen(wp$)<>len(w$(wn))then550
650 t=val(ti$):poke646,10:pokeop,32:pokeop+c,0:ifwp$=w$(wn)then680
660 forx=ctoc+24:pokex,0:next:forx=1to10:pokec+24,15:forq=1to3:next
670 pokec+24,0:forq=1to3:next:next:goto690
680 pokec+24,15:pokec,10:pokec+1,100:pokec+5,9:pokec+6,9:pokec+4,17:pokec+4,16
690 cu=cu+1:printd$(cu)tab(4)w$(wn);:sc=0:ifwp$=w$(wn)thensc=len(wp$)
700 printtab(19);:ifsc<10thenprint" ";
710 printsc;tab(26);:bo=0:ift<30thenbo=30-t
720 ifsc=0thenbo=0
730 ifbo<10thenprint" ";
740 printbo;tab(33);:ts(wc)=sc+bo:ifts(wc)<10thenprint" ";
750 printts(wc):poke646,15
760 printd$(16)tab(11)"press fire button":forx=1to50:next
770 printd$(16)tab(11)" ":forx=1to30:next
780 if(peek(56320)and16)=16then760
790 printd$(1)tab(11)" ":w$(wn)="":goto420
800 printd$(23):forx=1to15:print:next:poke646,8
810 printd$(12)tab(16)"game over":gt=0:forx=1to5:gt=gt+ts(x):next
820 printtab(13)"grand total"gt:ifgt>hsthenhs=gt
830 poke646,3:printtab(13)"high score"hs:poke646,12
840 printtab(11)"play again? yes/no":op=1807:pokeop,30:pokeop+c,3
850 poke646,13:printtab(10)"move ";:poke646,3:print"^";:poke646,13
860 print" with joystick":printtab(7)"press fire button to select"
870 if(peek(56320)and16)=0then930
880 j=15-(peek(56320)and15):ifj=4thendi=-4:goto910
890 ifj=8thendi=4:goto910
900 goto870
910 np=op+di:ifnp<1807ornp>1811then870
920 pokenp+c,3:pokeop,32:pokenp,30:pokeop+c,0:op=np:goto870
930 ifop=1807then160
940 sys64759
950 datahamburger,pizza,cabbage,carrot,spaghetti,strawberry,pineapple,raisin
960 datacheese,eggplant,potato,banana,cucumber,yogurt,bologna,marshmallow,chili
970 dataonion,squash,rhubarb,guitar,banjo,violin,drum,saxophone,trumpet
980 dataclarinet,piano,accordion,harmonica,harp,mandolin,flute,xylophone,organ
990 datacello,tuba,trombone,cymbal,tambourine,shoulder,ankle,heart,stomach
1000 datakidney,cornea,liver,spleen,brain,elbow,finger,tooth,aorta,knuckle
1010 datawrist,lung,intestine,foot,neck,tongue,orchid,petunia,zinnia,marigold
1020 dataaster,rose,peony,tulip,crocus,amaryllis,hyacinth,iris,pansy,gloxinia
1030 databegonia,snapdragon,geranium,daisy,violet,lily,stereo,carpet
1040 datasilverware,telephone,television,shelf,toaster,curtain,clock,cabinet
1050 datachair,stove,blanket,pillow,table,lamp,calendar,clothing,thermostat
1060 databroom,tornado,lightning,thunder,snow,sleet,rainbow,hurricane,humidity
1070 datatemperature,barometer,forecast,cloud,flood,hail,front,drought,blizzard
1080 datawind,warning,frost,attorney,surgeon,banker,artist,writer,carpenter
1090 dataengineer,reporter,architect,librarian,nurse,chef,politician,teacher
1100 dataplumber,janitor,farmer,clerk,athlete,electrician,turtle,cougar
1110 datarattlesnake,salmon,ostrich,peacock,zebra,skunk,buffalo,kangaroo,lizard
1120 datahummingbird,chimpanzee,antelope,sheep,dolphin,squirrel,raccoon,gopher
1130 datawoodpecker,1197,1201,1205,1209,1357,1361,1365,1369,1517,1521,1525,1529
1140 data22,96,44,193,89,131,25,30,50,60,100,121,28,49,56,99,112,199,0,0